define(function(require, exports, module) {

	"use strict";
	require("mui");
	require("jquery");
	var abpdata = require("abpinit");
	var abp = abpdata.abpstart;
	var template = require("template");
	mui.init({
		swipeBack: true //启用右滑关闭功能
	});

	var newAdd = require("../chioceProduct/newAdd.js");

	//选择负责人
	newAdd.newAccount("#listAccount");
	$(function() {

		//dataModel需要传的模型值,option非必要参数，默认传空对象，done异步完成，fail异步失败，data.success数值成功返回
		var option = {};
		var dataModel = {
			id: 0
		};
		/*客户分类*/
		getClientList("accountList", "#listAccount");

		function getClientList(templateId, mainId) {
			abp.services.app.infoAccount.getList(dataModel, option).
			done(function(data) {
				//          	console.log(data);
				var data1 = {};
				data1.list = data;
				var html = template(templateId, data1);
				$(mainId).html(html);
				if(data.success) {

				} else {
					//	            		console.log(data.error.message)

				}
			}).fail(function(data) {

			});
		}

	});
});